﻿Imports System.Data.SqlClient
Public Class Frm_Avoc_Bure_wadifa

    Private Sub Frm_Avoc_Bure_wadifa_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        Frm_Avoc_Bure.Enabled = True
        Frm_Clients.Enabled = True
        Frm_Adver.Enabled = True
        Frm_Avoc_Adv.Enabled = True
        Frm_chohoud.Enabled = True
        Frm_Avoc_Clien.Enabled = True
        Frm_Avoc_mokhabara.Enabled = True
        Frm_khabir.Enabled = True
        Frm_sahib_maktab.Enabled = True
        Frm_mowadafin.Enabled = True

        Partager.com_ville(Frm_Avoc_Bure.comb_wadifa, "comb_wadifa", "wadifa")
        Partager.com_ville(Frm_Clients.comb_wadifa, "comb_wadifa_clients", "wadifa")
    End Sub

    Private Sub Frm_Avoc_Bure_wadifa_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Partager.wadifa = "client" Then
            Partager.RemplirList(List_wadifa, "comb_wadifa_clients", "wadifa")
        Else
            Partager.RemplirList(List_wadifa, "comb_wadifa", "wadifa")
        End If
        'Partager.com_ville(Frm_Adver.comb_wadifa, "", "")
    End Sub

    Private Sub btn_ajout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_ajout.Click
        If Partager.wadifa = "client" Then
            Partager.AjouterWadifa(txt_wadifa, List_wadifa, "comb_wadifa_clients", "wadifa")
        Else
            Partager.AjouterWadifa(txt_wadifa, List_wadifa, "comb_wadifa", "wadifa")
        End If
    End Sub

    Private Sub btn_supp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_supp.Click
        If Partager.wadifa = "client" Then
            Partager.DeleteFromList(List_wadifa, "comb_wadifa_clients", "wadifa", txt_wadifa)
        Else
            Partager.DeleteFromList(List_wadifa, "comb_wadifa", "wadifa", txt_wadifa)
        End If
    End Sub
End Class